package com.betterjr.modules.commission.dubbo;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;

import com.alibaba.dubbo.config.annotation.Service;
import com.betterjr.common.web.AjaxObject;
import com.betterjr.modules.commission.service.CommissionFileDownHistoryService;
import com.betterjr.modules.commissionfile.ICommissionFileDownHistoryService;
import com.betterjr.modules.rule.service.RuleServiceDubboFilterInvoker;

@Service(interfaceClass = ICommissionFileDownHistoryService.class)
public class CommissionFileDownHistoryDubboService implements ICommissionFileDownHistoryService {

    @Autowired
    private CommissionFileDownHistoryService fileDownHistoryService;

    @Override
    public String webQueryFileDownHistroyList(Map<String, Object> anMap, String anFlag, int anPageNum, int anPageSize) {
        final Map<String, Object> queryMap = RuleServiceDubboFilterInvoker.getInputObj();
        return AjaxObject
                .newOkWithPage("佣金下载文件历史记录查询成功",
                        fileDownHistoryService.queryFileDownHistoryList(queryMap, anFlag, anPageNum, anPageSize))
                .toJson();
    }

}
